
<!DOCTYPE html>

<html>
  
<!-- Mirrored from docs.sympy.org/latest/modules/vector/api/vectorfunctions.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:29:14 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

    <title>Essential Functions in sympy.vector (docstrings) &#8212; SymPy 1.9 documentation</title>
    <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/default.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/graphviz.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/plot_directive.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-core.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-autocomplete.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-sphinx.css" />
    
    <script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
    <script src="../../../_static/jquery.js"></script>
    <script src="../../../_static/underscore.js"></script>
    <script src="../../../_static/doctools.js"></script>
    <script src="../../../../../live.sympy.org/static/utilities.js"></script>
    <script src="../../../../../live.sympy.org/static/external/classy.js"></script>
    <script src="../../../../../live.sympy.org/static/live-core.js"></script>
    <script src="../../../../../live.sympy.org/static/live-autocomplete.js"></script>
    <script src="../../../../../live.sympy.org/static/live-sphinx.js"></script>
    
    <link rel="shortcut icon" href="../../../_static/sympy-notailtext-favicon.ico"/>
    <link href="vectorfunctions.html" rel="canonical" />
    
    <link rel="index" title="Index" href="../../../genindex.html" />
    <link rel="search" title="Search" href="../../../search.html" />
    <link rel="next" title="SymPy Special Topics" href="../../../special_topics/index.html" />
    <link rel="prev" title="Orienter classes (docstrings)" href="orienterclasses.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../../../special_topics/index.html" title="SymPy Special Topics"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="orienterclasses.html" title="Orienter classes (docstrings)"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >SymPy Modules Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Vector</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">Essential Functions in sympy.vector (docstrings)</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="essential-functions-in-sympy-vector-docstrings">
<h1>Essential Functions in sympy.vector (docstrings)<a class="headerlink" href="#essential-functions-in-sympy-vector-docstrings" title="Permalink to this headline">¶</a></h1>
<section id="matrix-to-vector">
<h2>matrix_to_vector<a class="headerlink" href="#matrix-to-vector" title="Permalink to this headline">¶</a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="sympy.vector.matrix_to_vector">
<span class="sig-prename descclassname"><span class="pre">sympy.vector.</span></span><span class="sig-name descname"><span class="pre">matrix_to_vector</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">matrix</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">system</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/functions.py#L394-L430"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.matrix_to_vector" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts a vector in matrix form to a Vector instance.</p>
<p>It is assumed that the elements of the Matrix represent the
measure numbers of the components of the vector along basis
vectors of ‘system’.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>matrix</strong> : SymPy Matrix, Dimensions: (3, 1)</p>
<blockquote>
<div><p>The matrix to be converted to a vector</p>
</div></blockquote>
<p><strong>system</strong> : CoordSys3D</p>
<blockquote>
<div><p>The coordinate system the vector is to be defined in</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">ImmutableMatrix</span> <span class="k">as</span> <span class="n">Matrix</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">Matrix</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span><span class="p">,</span> <span class="n">matrix_to_vector</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;C&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v</span> <span class="o">=</span> <span class="n">matrix_to_vector</span><span class="p">(</span><span class="n">m</span><span class="p">,</span> <span class="n">C</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v</span>
<span class="go">C.i + 2*C.j + 3*C.k</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v</span><span class="o">.</span><span class="n">to_matrix</span><span class="p">(</span><span class="n">C</span><span class="p">)</span> <span class="o">==</span> <span class="n">m</span>
<span class="go">True</span>
</pre></div>
</div>
</dd></dl>

</section>
<section id="express">
<h2>express<a class="headerlink" href="#express" title="Permalink to this headline">¶</a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="sympy.vector.express">
<span class="sig-prename descclassname"><span class="pre">sympy.vector.</span></span><span class="sig-name descname"><span class="pre">express</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expr</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">system</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">system2</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">variables</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/functions.py#L11-L125"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.express" title="Permalink to this definition">¶</a></dt>
<dd><p>Global function for ‘express’ functionality.</p>
<p>Re-expresses a Vector, Dyadic or scalar(sympyfiable) in the given
coordinate system.</p>
<p>If ‘variables’ is True, then the coordinate variables (base scalars)
of other coordinate systems present in the vector/scalar field or
dyadic are also substituted in terms of the base scalars of the
given system.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>expr</strong> : Vector/Dyadic/scalar(sympyfiable)</p>
<blockquote>
<div><p>The expression to re-express in CoordSys3D ‘system’</p>
</div></blockquote>
<p><strong>system: CoordSys3D</strong></p>
<blockquote>
<div><p>The coordinate system the expr is to be expressed in</p>
</div></blockquote>
<p><strong>system2: CoordSys3D</strong></p>
<blockquote>
<div><p>The other coordinate system required for re-expression
(only for a Dyadic Expr)</p>
</div></blockquote>
<p><strong>variables</strong> : boolean</p>
<blockquote>
<div><p>Specifies whether to substitute the coordinate variables present
in expr, in terms of those of parameter system</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Symbol</span><span class="p">,</span> <span class="n">cos</span><span class="p">,</span> <span class="n">sin</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;N&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">q</span> <span class="o">=</span> <span class="n">Symbol</span><span class="p">(</span><span class="s1">&#39;q&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">B</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new_axis</span><span class="p">(</span><span class="s1">&#39;B&#39;</span><span class="p">,</span> <span class="n">q</span><span class="p">,</span> <span class="n">N</span><span class="o">.</span><span class="n">k</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">express</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">express</span><span class="p">(</span><span class="n">B</span><span class="o">.</span><span class="n">i</span><span class="p">,</span> <span class="n">N</span><span class="p">)</span>
<span class="go">(cos(q))*N.i + (sin(q))*N.j</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">express</span><span class="p">(</span><span class="n">N</span><span class="o">.</span><span class="n">x</span><span class="p">,</span> <span class="n">B</span><span class="p">,</span> <span class="n">variables</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="go">B.x*cos(q) - B.y*sin(q)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">i</span><span class="o">.</span><span class="n">outer</span><span class="p">(</span><span class="n">N</span><span class="o">.</span><span class="n">i</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">express</span><span class="p">(</span><span class="n">d</span><span class="p">,</span> <span class="n">B</span><span class="p">,</span> <span class="n">N</span><span class="p">)</span> <span class="o">==</span> <span class="p">(</span><span class="n">cos</span><span class="p">(</span><span class="n">q</span><span class="p">))</span><span class="o">*</span><span class="p">(</span><span class="n">B</span><span class="o">.</span><span class="n">i</span><span class="o">|</span><span class="n">N</span><span class="o">.</span><span class="n">i</span><span class="p">)</span> <span class="o">+</span> <span class="p">(</span><span class="o">-</span><span class="n">sin</span><span class="p">(</span><span class="n">q</span><span class="p">))</span><span class="o">*</span><span class="p">(</span><span class="n">B</span><span class="o">.</span><span class="n">j</span><span class="o">|</span><span class="n">N</span><span class="o">.</span><span class="n">i</span><span class="p">)</span>
<span class="go">True</span>
</pre></div>
</div>
</dd></dl>

</section>
<section id="curl">
<h2>curl<a class="headerlink" href="#curl" title="Permalink to this headline">¶</a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="sympy.vector.curl">
<span class="sig-prename descclassname"><span class="pre">sympy.vector.</span></span><span class="sig-name descname"><span class="pre">curl</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vect</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coord_sys</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">doit</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/operators.py#L122-L198"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.curl" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the curl of a vector field computed wrt the base scalars
of the given coordinate system.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>vect</strong> : Vector</p>
<blockquote>
<div><p>The vector operand</p>
</div></blockquote>
<p><strong>coord_sys</strong> : CoordSys3D</p>
<blockquote>
<div><p>The coordinate system to calculate the gradient in.
Deprecated since version 1.1</p>
</div></blockquote>
<p><strong>doit</strong> : bool</p>
<blockquote>
<div><p>If True, the result is returned after calling .doit() on
each component. Else, the returned expression contains
Derivative instances</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span><span class="p">,</span> <span class="n">curl</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">R</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;R&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v1</span> <span class="o">=</span> <span class="n">R</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">z</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="n">R</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">z</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">j</span> <span class="o">+</span> <span class="n">R</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">k</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">curl</span><span class="p">(</span><span class="n">v1</span><span class="p">)</span>
<span class="go">0</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v2</span> <span class="o">=</span> <span class="n">R</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">z</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">i</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">curl</span><span class="p">(</span><span class="n">v2</span><span class="p">)</span>
<span class="go">R.x*R.y*R.j + (-R.x*R.z)*R.k</span>
</pre></div>
</div>
</dd></dl>

</section>
<section id="divergence">
<h2>divergence<a class="headerlink" href="#divergence" title="Permalink to this headline">¶</a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="sympy.vector.divergence">
<span class="sig-prename descclassname"><span class="pre">sympy.vector.</span></span><span class="sig-name descname"><span class="pre">divergence</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vect</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coord_sys</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">doit</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/operators.py#L201-L269"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.divergence" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the divergence of a vector field computed wrt the base
scalars of the given coordinate system.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>vector</strong> : Vector</p>
<blockquote>
<div><p>The vector operand</p>
</div></blockquote>
<p><strong>coord_sys</strong> : CoordSys3D</p>
<blockquote>
<div><p>The coordinate system to calculate the gradient in
Deprecated since version 1.1</p>
</div></blockquote>
<p><strong>doit</strong> : bool</p>
<blockquote>
<div><p>If True, the result is returned after calling .doit() on
each component. Else, the returned expression contains
Derivative instances</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span><span class="p">,</span> <span class="n">divergence</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">R</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;R&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v1</span> <span class="o">=</span> <span class="n">R</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">z</span> <span class="o">*</span> <span class="p">(</span><span class="n">R</span><span class="o">.</span><span class="n">i</span><span class="o">+</span><span class="n">R</span><span class="o">.</span><span class="n">j</span><span class="o">+</span><span class="n">R</span><span class="o">.</span><span class="n">k</span><span class="p">)</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">divergence</span><span class="p">(</span><span class="n">v1</span><span class="p">)</span>
<span class="go">R.x*R.y + R.x*R.z + R.y*R.z</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v2</span> <span class="o">=</span> <span class="mi">2</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">z</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">j</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">divergence</span><span class="p">(</span><span class="n">v2</span><span class="p">)</span>
<span class="go">2*R.z</span>
</pre></div>
</div>
</dd></dl>

</section>
<section id="gradient">
<h2>gradient<a class="headerlink" href="#gradient" title="Permalink to this headline">¶</a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="sympy.vector.gradient">
<span class="sig-prename descclassname"><span class="pre">sympy.vector.</span></span><span class="sig-name descname"><span class="pre">gradient</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">scalar_field</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coord_sys</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">doit</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/operators.py#L272-L327"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.gradient" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the vector gradient of a scalar field computed wrt the
base scalars of the given coordinate system.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>scalar_field</strong> : SymPy Expr</p>
<blockquote>
<div><p>The scalar field to compute the gradient of</p>
</div></blockquote>
<p><strong>coord_sys</strong> : CoordSys3D</p>
<blockquote>
<div><p>The coordinate system to calculate the gradient in
Deprecated since version 1.1</p>
</div></blockquote>
<p><strong>doit</strong> : bool</p>
<blockquote>
<div><p>If True, the result is returned after calling .doit() on
each component. Else, the returned expression contains
Derivative instances</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span><span class="p">,</span> <span class="n">gradient</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">R</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;R&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">s1</span> <span class="o">=</span> <span class="n">R</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">z</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">gradient</span><span class="p">(</span><span class="n">s1</span><span class="p">)</span>
<span class="go">R.y*R.z*R.i + R.x*R.z*R.j + R.x*R.y*R.k</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">s2</span> <span class="o">=</span> <span class="mi">5</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">x</span><span class="o">**</span><span class="mi">2</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">z</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">gradient</span><span class="p">(</span><span class="n">s2</span><span class="p">)</span>
<span class="go">10*R.x*R.z*R.i + 5*R.x**2*R.k</span>
</pre></div>
</div>
</dd></dl>

</section>
<section id="is-conservative">
<h2>is_conservative<a class="headerlink" href="#is-conservative" title="Permalink to this headline">¶</a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="sympy.vector.is_conservative">
<span class="sig-prename descclassname"><span class="pre">sympy.vector.</span></span><span class="sig-name descname"><span class="pre">is_conservative</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/functions.py#L208-L238"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.is_conservative" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks if a field is conservative.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>field</strong> : Vector</p>
<blockquote>
<div><p>The field to check for conservative property</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">is_conservative</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">R</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;R&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">is_conservative</span><span class="p">(</span><span class="n">R</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">z</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="n">R</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">z</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">j</span> <span class="o">+</span> <span class="n">R</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">k</span><span class="p">)</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">is_conservative</span><span class="p">(</span><span class="n">R</span><span class="o">.</span><span class="n">z</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">j</span><span class="p">)</span>
<span class="go">False</span>
</pre></div>
</div>
</dd></dl>

</section>
<section id="is-solenoidal">
<h2>is_solenoidal<a class="headerlink" href="#is-solenoidal" title="Permalink to this headline">¶</a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="sympy.vector.is_solenoidal">
<span class="sig-prename descclassname"><span class="pre">sympy.vector.</span></span><span class="sig-name descname"><span class="pre">is_solenoidal</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/functions.py#L241-L271"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.is_solenoidal" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks if a field is solenoidal.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>field</strong> : Vector</p>
<blockquote>
<div><p>The field to check for solenoidal property</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">is_solenoidal</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">R</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;R&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">is_solenoidal</span><span class="p">(</span><span class="n">R</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">z</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="n">R</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">z</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">j</span> <span class="o">+</span> <span class="n">R</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">k</span><span class="p">)</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">is_solenoidal</span><span class="p">(</span><span class="n">R</span><span class="o">.</span><span class="n">y</span> <span class="o">*</span> <span class="n">R</span><span class="o">.</span><span class="n">j</span><span class="p">)</span>
<span class="go">False</span>
</pre></div>
</div>
</dd></dl>

</section>
<section id="scalar-potential">
<h2>scalar_potential<a class="headerlink" href="#scalar-potential" title="Permalink to this headline">¶</a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="sympy.vector.scalar_potential">
<span class="sig-prename descclassname"><span class="pre">sympy.vector.</span></span><span class="sig-name descname"><span class="pre">scalar_potential</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coord_sys</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/functions.py#L274-L322"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.scalar_potential" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the scalar potential function of a field in a given
coordinate system (without the added integration constant).</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>field</strong> : Vector</p>
<blockquote>
<div><p>The vector field whose scalar potential function is to be
calculated</p>
</div></blockquote>
<p><strong>coord_sys</strong> : CoordSys3D</p>
<blockquote>
<div><p>The coordinate system to do the calculation in</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">scalar_potential</span><span class="p">,</span> <span class="n">gradient</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">R</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;R&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">scalar_potential</span><span class="p">(</span><span class="n">R</span><span class="o">.</span><span class="n">k</span><span class="p">,</span> <span class="n">R</span><span class="p">)</span> <span class="o">==</span> <span class="n">R</span><span class="o">.</span><span class="n">z</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">scalar_field</span> <span class="o">=</span> <span class="mi">2</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">x</span><span class="o">**</span><span class="mi">2</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">z</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">grad_field</span> <span class="o">=</span> <span class="n">gradient</span><span class="p">(</span><span class="n">scalar_field</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">scalar_potential</span><span class="p">(</span><span class="n">grad_field</span><span class="p">,</span> <span class="n">R</span><span class="p">)</span>
<span class="go">2*R.x**2*R.y*R.z</span>
</pre></div>
</div>
</dd></dl>

</section>
<section id="scalar-potential-difference">
<h2>scalar_potential_difference<a class="headerlink" href="#scalar-potential-difference" title="Permalink to this headline">¶</a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="sympy.vector.scalar_potential_difference">
<span class="sig-prename descclassname"><span class="pre">sympy.vector.</span></span><span class="sig-name descname"><span class="pre">scalar_potential_difference</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coord_sys</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">point1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">point2</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/functions.py#L325-L391"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.scalar_potential_difference" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the scalar potential difference between two points in a
certain coordinate system, wrt a given field.</p>
<p>If a scalar field is provided, its values at the two points are
considered. If a conservative vector field is provided, the values
of its scalar potential function at the two points are used.</p>
<p>Returns (potential at point2) - (potential at point1)</p>
<p>The position vectors of the two Points are calculated wrt the
origin of the coordinate system provided.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>field</strong> : Vector/Expr</p>
<blockquote>
<div><p>The field to calculate wrt</p>
</div></blockquote>
<p><strong>coord_sys</strong> : CoordSys3D</p>
<blockquote>
<div><p>The coordinate system to do the calculations in</p>
</div></blockquote>
<p><strong>point1</strong> : Point</p>
<blockquote>
<div><p>The initial Point in given coordinate system</p>
</div></blockquote>
<p><strong>position2</strong> : Point</p>
<blockquote>
<div><p>The second Point in the given coordinate system</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">scalar_potential_difference</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">R</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;R&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">P</span> <span class="o">=</span> <span class="n">R</span><span class="o">.</span><span class="n">origin</span><span class="o">.</span><span class="n">locate_new</span><span class="p">(</span><span class="s1">&#39;P&#39;</span><span class="p">,</span> <span class="n">R</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="n">R</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">j</span> <span class="o">+</span> <span class="n">R</span><span class="o">.</span><span class="n">z</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">k</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">vectfield</span> <span class="o">=</span> <span class="mi">4</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="mi">2</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">x</span><span class="o">**</span><span class="mi">2</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">j</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">scalar_potential_difference</span><span class="p">(</span><span class="n">vectfield</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="n">R</span><span class="o">.</span><span class="n">origin</span><span class="p">,</span> <span class="n">P</span><span class="p">)</span>
<span class="go">2*R.x**2*R.y</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Q</span> <span class="o">=</span> <span class="n">R</span><span class="o">.</span><span class="n">origin</span><span class="o">.</span><span class="n">locate_new</span><span class="p">(</span><span class="s1">&#39;O&#39;</span><span class="p">,</span> <span class="mi">3</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="n">R</span><span class="o">.</span><span class="n">j</span> <span class="o">+</span> <span class="mi">2</span><span class="o">*</span><span class="n">R</span><span class="o">.</span><span class="n">k</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">scalar_potential_difference</span><span class="p">(</span><span class="n">vectfield</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="n">P</span><span class="p">,</span> <span class="n">Q</span><span class="p">)</span>
<span class="go">-2*R.x**2*R.y + 18</span>
</pre></div>
</div>
</dd></dl>

</section>
<section id="vector-integrate">
<h2>vector_integrate<a class="headerlink" href="#vector-integrate" title="Permalink to this headline">¶</a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="sympy.vector.integrals.vector_integrate">
<span class="sig-prename descclassname"><span class="pre">sympy.vector.integrals.</span></span><span class="sig-name descname"><span class="pre">vector_integrate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">region</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/integrals.py#L145-L207"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.integrals.vector_integrate" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute the integral of a vector/scalar field
over a a region or a set of parameters.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span><span class="p">,</span> <span class="n">ParametricRegion</span><span class="p">,</span> <span class="n">vector_integrate</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.abc</span> <span class="kn">import</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">t</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;C&#39;</span><span class="p">)</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">region</span> <span class="o">=</span> <span class="n">ParametricRegion</span><span class="p">((</span><span class="n">t</span><span class="p">,</span> <span class="n">t</span><span class="o">**</span><span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">5</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">vector_integrate</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">i</span><span class="p">,</span> <span class="n">region</span><span class="p">)</span>
<span class="go">12</span>
</pre></div>
</div>
<p>Integrals over some objects of geometry module can also be calculated.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.geometry</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Circle</span><span class="p">,</span> <span class="n">Triangle</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">Circle</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span> <span class="mi">5</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">vector_integrate</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">x</span><span class="o">**</span><span class="mi">2</span> <span class="o">+</span> <span class="n">C</span><span class="o">.</span><span class="n">y</span><span class="o">**</span><span class="mi">2</span><span class="p">,</span> <span class="n">c</span><span class="p">)</span>
<span class="go">290*pi</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">triangle</span> <span class="o">=</span> <span class="n">Triangle</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="o">-</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="n">Point</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">5</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">vector_integrate</span><span class="p">(</span><span class="mi">3</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">x</span><span class="o">**</span><span class="mi">2</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="n">C</span><span class="o">.</span><span class="n">j</span><span class="p">,</span> <span class="n">triangle</span><span class="p">)</span>
<span class="go">-8</span>
</pre></div>
</div>
<p>Integrals over some simple implicit regions can be computed. But in most cases,
it takes too long to compute over them. This is due to the expressions of parametric
representation becoming large.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">ImplicitRegion</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c2</span> <span class="o">=</span> <span class="n">ImplicitRegion</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">),</span> <span class="p">(</span><span class="n">x</span> <span class="o">-</span> <span class="mi">2</span><span class="p">)</span><span class="o">**</span><span class="mi">2</span> <span class="o">+</span> <span class="p">(</span><span class="n">y</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span><span class="o">**</span><span class="mi">2</span> <span class="o">-</span> <span class="mi">9</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">vector_integrate</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">c2</span><span class="p">)</span>
<span class="go">6*pi</span>
</pre></div>
</div>
<p>Integral of fields with respect to base scalars:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">vector_integrate</span><span class="p">(</span><span class="mi">12</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">y</span><span class="o">**</span><span class="mi">3</span><span class="p">,</span> <span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">y</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">))</span>
<span class="go">240</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">vector_integrate</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">x</span><span class="o">**</span><span class="mi">2</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">z</span><span class="p">,</span> <span class="n">C</span><span class="o">.</span><span class="n">x</span><span class="p">)</span>
<span class="go">C.x**3*C.z/3</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">vector_integrate</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">i</span> <span class="o">-</span> <span class="n">C</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">k</span><span class="p">,</span> <span class="n">C</span><span class="o">.</span><span class="n">x</span><span class="p">)</span>
<span class="go">(Integral(C.x, C.x))*C.i + (Integral(-C.y, C.x))*C.k</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">_</span><span class="o">.</span><span class="n">doit</span><span class="p">()</span>
<span class="go">C.x**2/2*C.i + (-C.x*C.y)*C.k</span>
</pre></div>
</div>
</dd></dl>

</section>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../../index.html">
              <img class="logo" src="../../../_static/sympylogo.png" alt="Logo"/>
            </a></p>
  <h3><a href="../../../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Essential Functions in sympy.vector (docstrings)</a><ul>
<li><a class="reference internal" href="#matrix-to-vector">matrix_to_vector</a></li>
<li><a class="reference internal" href="#express">express</a></li>
<li><a class="reference internal" href="#curl">curl</a></li>
<li><a class="reference internal" href="#divergence">divergence</a></li>
<li><a class="reference internal" href="#gradient">gradient</a></li>
<li><a class="reference internal" href="#is-conservative">is_conservative</a></li>
<li><a class="reference internal" href="#is-solenoidal">is_solenoidal</a></li>
<li><a class="reference internal" href="#scalar-potential">scalar_potential</a></li>
<li><a class="reference internal" href="#scalar-potential-difference">scalar_potential_difference</a></li>
<li><a class="reference internal" href="#vector-integrate">vector_integrate</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="orienterclasses.html"
                        title="previous chapter">Orienter classes (docstrings)</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="../../../special_topics/index.html"
                        title="next chapter">SymPy Special Topics</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../../_sources/modules/vector/api/vectorfunctions.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="https://docs.sympy.org/latest/search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../../../special_topics/index.html" title="SymPy Special Topics"
             >next</a> |</li>
        <li class="right" >
          <a href="orienterclasses.html" title="Orienter classes (docstrings)"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >SymPy Modules Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="../index.html" >Vector</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">Essential Functions in sympy.vector (docstrings)</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2021 SymPy Development Team.
      Last updated on Sep 30, 2021.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.1.2.
    </div>
  </body>

<!-- Mirrored from docs.sympy.org/latest/modules/vector/api/vectorfunctions.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:29:15 GMT -->
</html>